<?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
// 在此处，使用的是 auth 中间件，:api 的意思是说，我们指定了 auth 中间件的 driver 为 api, 而如果不指定的话，driver 默认使用的是 web. 关于认证的配置文件 config/auth.php 中各项配置的介绍
Route::group(['middleware' => 'auth:api'], function () {
  Route::get('/t', function () {
      return 'ok';
  });
});


//收货地址列表
// Route::group(['middleware' => 'login.jwt'],function($api){
//     $api->get('user_addresses','UserAddressesController@index');
// });

Route::group(['middleware' => 'jwt.auth'], function () {
    Route::get('/tt', function () {
        return 'ok';
    });
});

Route::get('/', function () {
    return view('login');
});
Route::any('login',[\App\Http\Controllers\PagesController::class,'login']);
Route::any('index',[\App\Http\Controllers\PagesController::class,'index']);
Route::any('welcome',[\App\Http\Controllers\PagesController::class,'welcome']);


Route::get('address',[\App\Http\Controllers\UserAddressesController::class,'index']);

Route::get('bind',[\App\Http\Controllers\BindController::class,'index']);

